package urban_seed_ph

import (
	"fmt"
	"gitee.com/theegg/go-brick/app/model/urban/urban_elements"
	"gitee.com/theegg/go-brick/app/service/app"
)

// 饭店 seed
func InitPartnerRestaurantElementsSeed() {

	items := make(map[int]urban_elements.UrbanElements)

	items[420001] = urban_elements.UrbanElements{
		Id:          420001,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "鼎泰丰",
		TitleEn:     "Din Tai Fung",
		TypeId:      2,
		TypeSubId:   2007,
		Summary:     "鼎泰丰享誉世界的台湾小笼包专卖店，1972年成立于台湾，先后在日本、美国、香港、新加坡、中国、菲律宾等地均开有分店, 无前来说菲律宾最好吃得小龙包之一",
		Content:     "",

		OpenTime:    "11:00",
		CloseTime:   "22:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Phone: "+63288091865",

		Tags: "干净卫生,服务极好,价格合理",

		Country:    "ph",
		ProvinceId: 1025,
		CityId:     1025017,
		Address:    "Lower Ground, C1, Bonifacio High Street Central 7th Ave. corner 29th St., Bonifacio Global City, Taguig, Metro Manila, Philippines",

		CoordinateX: "14.5506752",
		CoordinateY: "121.0491975",
		PlusCode:    "H22X+F7 塔吉格 菲律宾 Metro Manila",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[420002] = urban_elements.UrbanElements{
		Id:          420002,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "添好运",
		TitleEn:     "Tim Ho Wan",
		TypeId:      2,
		TypeSubId:   2007,
		Summary:     "添好运是一家世界著名的港式点心店，其分店遍布东南亚、台湾、澳门、日本、澳大利亚以及美国。店内的点心“即叫即蒸”，让顾客以最少的价格，享受五星级酒店点心的手艺！从添好运在新加坡开第一家分店开始，它门外的队伍就从来没有断过.",
		Content:     "",

		OpenTime:    "10:00",
		CloseTime:   "03:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Phone: "+639175963510",

		Tags: "干净卫生,服务极好,价格合理",

		Country:    "ph",
		ProvinceId: 1025,
		CityId:     1025017,
		Address:    "Uptown Mall Grd Floor, 36th St, Taguig, Metro Manila, Philippines",

		CoordinateX: "14.5568463",
		CoordinateY: "121.0541876",
		PlusCode:    "H343+PJ 塔吉格 菲律宾 Metro Manila",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[420003] = urban_elements.UrbanElements{
		Id:          420003,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "团团",
		TitleEn:     "Tuantuan Chinese Brasserie",
		TypeId:      2,
		TypeSubId:   2007,
		Summary:     "鱼汤面闻名海外",
		Content:     "",

		OpenTime:    "11:00",
		CloseTime:   "22:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Phone: "+639064332595",

		Tags: "干净卫生,服务极好,价格合理",

		Country:    "ph",
		ProvinceId: 1025,
		CityId:     1025017,
		Address:    "5 floor, SM Aura Premier, McKinley Pkwy, Taguig, 1634 Metro Manila, Philippines",

		CoordinateX: "14.5478348",
		CoordinateY: "121.0516601",
		PlusCode:    "G3W3+HW 塔吉格 菲律宾 Metro Manila",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[420004] = urban_elements.UrbanElements{
		Id:          420004,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "鹿港小镇",
		TitleEn:     "Lugang Cafe SM Aura",
		TypeId:      2,
		TypeSubId:   2007,
		Summary:     "鱼汤面闻名海外",
		Content:     "",

		OpenTime:    "11:00",
		CloseTime:   "22:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Phone: "+63285195663",

		Tags: "干净卫生,服务极好,价格合理",

		Country:    "ph",
		ProvinceId: 1025,
		CityId:     1025017,
		Address:    "SM Aura Premier, 5/L McKinley Pkwy, Taguig, 1634 Metro Manila, Philippines",

		CoordinateX: "14.546748",
		CoordinateY: "121.0545499",
		PlusCode:    "G3W3+MR 塔吉格 菲律宾 Metro Manila",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	count := 0
	errCount := 0
	for _, item := range items {
		_, err := app.Db().Insert(item)
		if err != nil {
			fmt.Println(err.Error())
			errCount++
		} else {
			count++
		}
	}

	fmt.Printf("%5s|%25s|%10d|%8d|\n", "", "urban_elements", count, errCount)
}
